/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ui;

import java.awt.Graphics;

/**
 * 
 * @author Anh
 */
public class Startup extends javax.swing.JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * Creates new form Startup
	 */
	public Startup() {
		initComponents();

		imagePanel2.setImage(new javax.swing.ImageIcon(getClass().getResource("/Resources/stock2.png")).getImage());
		imagePanel3.setImage(new javax.swing.ImageIcon(getClass().getResource("/Resources/stock3.png")).getImage());
	}

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */

	// <editor-fold defaultstate="collapsed"
	// desc="Generated Code">//GEN-BEGIN:initComponents
	private void initComponents() {

		jPanel1 = new javax.swing.JPanel() {
			/**
			 * 
			 */
			private static final long serialVersionUID = 1L;

			@Override
			protected void paintComponent(Graphics g) {
				g.drawImage(new javax.swing.ImageIcon(getClass().getResource("/Resources/bg1.jpg")).getImage(), 0, 0,
						this.getWidth(), this.getHeight(), null);
			}
		};
		imagePanel2 = new ui.ImagePanel();
		jLabel1 = new javax.swing.JLabel();
		btnStart = new javax.swing.JButton();
		imagePanel3 = new ui.ImagePanel();
		jLabel2 = new javax.swing.JLabel() {
			/**
			 * 
			 */
			private static final long serialVersionUID = 1L;

			@Override
			public void paintComponent(Graphics g) {
				super.paintComponent(g);
				g.drawLine(0, 0, jLabel2.getWidth(), 0);
			}
		};

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
		setTitle("Multi-class Classification");
		setIconImage(new javax.swing.ImageIcon(getClass().getResource("/Resources/java.png")).getImage());
		setResizable(false);

		jPanel1.setBackground(new java.awt.Color(255, 255, 255));

		imagePanel2.setPreferredSize(new java.awt.Dimension(145, 125));

		javax.swing.GroupLayout imagePanel2Layout = new javax.swing.GroupLayout(imagePanel2);
		imagePanel2.setLayout(imagePanel2Layout);
		imagePanel2Layout.setHorizontalGroup(imagePanel2Layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 111, Short.MAX_VALUE));
		imagePanel2Layout.setVerticalGroup(imagePanel2Layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 110, Short.MAX_VALUE));

		jLabel1.setFont(new java.awt.Font("Times New Roman", 3, 48)); // NOI18N
		jLabel1.setText("Multi-class Classification");

		btnStart.setFont(new java.awt.Font("Times New Roman", 0, 36)); // NOI18N
		btnStart.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Resources/login.png"))); // NOI18N
		btnStart.setText("Start");
		btnStart.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				btnStartActionPerformed(evt);
			}
		});

		imagePanel3.setPreferredSize(new java.awt.Dimension(145, 125));

		javax.swing.GroupLayout imagePanel3Layout = new javax.swing.GroupLayout(imagePanel3);
		imagePanel3.setLayout(imagePanel3Layout);
		imagePanel3Layout.setHorizontalGroup(imagePanel3Layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 348, Short.MAX_VALUE));
		imagePanel3Layout.setVerticalGroup(imagePanel3Layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 353, Short.MAX_VALUE));

		jLabel2.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
		jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
		jLabel2.setText("Version 1.0");

		javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
		jPanel1.setLayout(jPanel1Layout);
		jPanel1Layout.setHorizontalGroup(jPanel1Layout
				.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
				.addGroup(
						jPanel1Layout
								.createSequentialGroup()
								.addContainerGap(378, Short.MAX_VALUE)
								.addGroup(
										jPanel1Layout
												.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
												.addGroup(
														javax.swing.GroupLayout.Alignment.TRAILING,
														jPanel1Layout.createSequentialGroup().addComponent(jLabel1)
																.addGap(42, 42, 42))
												.addGroup(
														javax.swing.GroupLayout.Alignment.TRAILING,
														jPanel1Layout
																.createSequentialGroup()
																.addComponent(btnStart,
																		javax.swing.GroupLayout.PREFERRED_SIZE, 214,
																		javax.swing.GroupLayout.PREFERRED_SIZE)
																.addGap(154, 154, 154))
												.addGroup(
														javax.swing.GroupLayout.Alignment.TRAILING,
														jPanel1Layout
																.createSequentialGroup()
																.addComponent(jLabel2,
																		javax.swing.GroupLayout.PREFERRED_SIZE, 140,
																		javax.swing.GroupLayout.PREFERRED_SIZE)
																.addGap(51, 51, 51))))
				.addGroup(
						javax.swing.GroupLayout.Alignment.TRAILING,
						jPanel1Layout
								.createSequentialGroup()
								.addGap(0, 0, Short.MAX_VALUE)
								.addComponent(imagePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 111,
										javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap())
				.addGroup(
						jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
								jPanel1Layout
										.createSequentialGroup()
										.addContainerGap()
										.addComponent(imagePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 348,
												javax.swing.GroupLayout.PREFERRED_SIZE)
										.addContainerGap(523, Short.MAX_VALUE))));
		jPanel1Layout.setVerticalGroup(jPanel1Layout
				.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
				.addGroup(
						jPanel1Layout
								.createSequentialGroup()
								.addGap(4, 4, 4)
								.addComponent(imagePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 110,
										javax.swing.GroupLayout.PREFERRED_SIZE)
								.addGap(27, 27, 27)
								.addComponent(jLabel1)
								.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
								.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 29,
										javax.swing.GroupLayout.PREFERRED_SIZE).addGap(31, 31, 31)
								.addComponent(btnStart).addContainerGap(89, Short.MAX_VALUE))
				.addGroup(
						jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
								jPanel1Layout
										.createSequentialGroup()
										.addGap(41, 41, 41)
										.addComponent(imagePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 353,
												javax.swing.GroupLayout.PREFERRED_SIZE)
										.addContainerGap(32, Short.MAX_VALUE))));

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
		getContentPane().setLayout(layout);
		layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
				layout.createSequentialGroup()
						.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
								javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
						.addGap(0, 0, Short.MAX_VALUE)));
		layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
				layout.createSequentialGroup()
						.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
								javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
						.addGap(0, 0, Short.MAX_VALUE)));

		pack();
	}// </editor-fold>//GEN-END:initComponents

	private void btnStartActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnStartActionPerformed
		Screen scr = new Screen();
		scr.pack();
		scr.setVisible(true);
		this.setVisible(false);
	}// GEN-LAST:event_btnStartActionPerformed

	/**
	 * @param args
	 *            the command line arguments
	 */
	public static void main(String args[]) {
		/* Set the Nimbus look and feel */
		// <editor-fold defaultstate="collapsed"
		// desc=" Look and feel setting code (optional) ">
		/*
		 * If Nimbus (introduced in Java SE 6) is not available, stay with the
		 * default look and feel. For details see
		 * http://download.oracle.com/javase
		 * /tutorial/uiswing/lookandfeel/plaf.html
		 */
		try {
			for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
				if ("Nimbus".equals(info.getName())) {
					javax.swing.UIManager.setLookAndFeel(info.getClassName());
					break;
				}
			}
		} catch (ClassNotFoundException ex) {
			java.util.logging.Logger.getLogger(Startup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
		} catch (InstantiationException ex) {
			java.util.logging.Logger.getLogger(Startup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
		} catch (IllegalAccessException ex) {
			java.util.logging.Logger.getLogger(Startup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
		} catch (javax.swing.UnsupportedLookAndFeelException ex) {
			java.util.logging.Logger.getLogger(Startup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
		}
		// </editor-fold>

		/* Create and display the form */
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				new Startup().setVisible(true);
			}
		});
	}

	// Variables declaration - do not modify//GEN-BEGIN:variables
	private javax.swing.JButton btnStart;
	private ui.ImagePanel imagePanel2;
	private ui.ImagePanel imagePanel3;
	private javax.swing.JLabel jLabel1;
	private javax.swing.JLabel jLabel2;
	private javax.swing.JPanel jPanel1;
	// End of variables declaration//GEN-END:variables
}
